package scu.maqiang.meshgeneration;

import scu.maqiang.mesh.*;

public class PolygenMesh {
    public static void main(String[] args) {
//        Mesh2DT3Generator mg = new Mesh2DT3Generator();
//        double[] x = {0.0, 1.0, 0.5};
//        double[] y = {0.0, 0.0, 0.5 * Math.sqrt(3)};
//        Mesh2DT3 mesh = mg.triangle(x, y, 20);
//        mesh.toTecplot("TriangleMesh.dat");
        String fileName = "JianShuangZhui.mesh";
        Mesh3T4 mesh = new Mesh3T4().readMesh(fileName, MeshFormat.mesh);
        mesh.toTecplot("JianShuangZhui.dat");
        mesh.saveMesh(MeshFormat.msh, "JianShuangZhui.msh");
        fileName = "craftquarter.mesh";
        mesh = new Mesh3T4().readMesh(fileName, MeshFormat.mesh);
        mesh.toTecplot("craftquarter.dat");
        mesh.saveMesh(MeshFormat.msh, "craftquarter.msh");
        fileName = "MyWrench3DT.msh";
        mesh = new Mesh3T4().readMesh(fileName, MeshFormat.msh1);
        mesh.toTecplot("MyWrench3DT.dat");
        mesh.saveMesh(MeshFormat.msh, "MyWrench3DT2.msh");
        fileName = "MyLinJian3DT.msh";
        mesh = new Mesh3T4().readMesh(fileName, MeshFormat.msh1);
        mesh.toTecplot("MyLinJian3DT.dat");
        mesh.saveMesh(MeshFormat.msh, "MyLinJian3DT2.msh");
    }
}
